package com.tovast.demo.service.impl;

import com.tovast.demo.domain.Attendance;
import com.tovast.demo.repository.AttendanceRepostiroy;
import com.tovast.demo.service.AttendanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zjp on 2016/9/30.
 */

@Service
public class AttendanceServiceJpaImpl implements AttendanceService{
    @Autowired
    private AttendanceRepostiroy  attendanceRepostiroy;

    @Override
    public Attendance registe(Attendance attendance) {
        attendanceRepostiroy.saveAndFlush(attendance);
        return attendance;
    }

    @Override
    public Attendance destroy(Attendance attendance) {
        attendanceRepostiroy.delete(attendance);
        return attendance;
    }
}
